# 1）将字符串"askdsdfjas"中的所有字符a转变成A
#创建一个字符串
# a="askdsdfjas"
#用replace
# print(a.replace('a', 'A'))

# 2）打印26个英文字母，大写
#A，Z对应的对应的Unicode
# print(ord("A"))
# print(ord("Z"))
#得出对应的Unicode范围
# for i in range(65,91):
#返回输出Unicode对应的字符
#     print(chr(i),end=" ")
#
# for i in range(ord("A"),ord("Z")):
#     print(chr(i),end=" ")

# 3）从句子中提取所有长度大于3的单词
# "The gentle breeze carried the sweet scent of blooming flowers through the quiet garden."

# a="The gentle breeze carried the sweet scent of blooming flowers through the quiet garden"
# b=a.split(" ")
# c=[]
# for i in b:
#     if len(i) >3:
#         c.append(i)
# print(c)

# 4）字典：dict1 = dict2 = {1:"张三",2:"lisi",3:"lily",4:"lucy",5:"张三",6:"lily",7:"lisi"}
# 根据上面字典的元素，生成要给新字典，要求：新字典的key为name  value为name出现的次数 并且打印输出，格式为：
#     名字张三有x个
#     名字lisi有x个

# dict2 = {1: "张三", 2: "lisi", 3: "lily", 4: "lucy", 5: "张三", 6: "lily", 7: "lisi"}
# a=[]
# b={}
# for v in dict2.values():
#     a.append(v)
# for i in a:
#     c=a.count(i)
#     b[i] = c
# for i, c in b.items():
#     print(f"名字{i}有{c}个")

